package cn.jeasy.sample.controller;

import java.util.List;

import javax.annotation.Resource;

import cn.jeasy.core.bean.annotation.Component;
import cn.jeasy.sample.entity.User;
import cn.jeasy.sample.service.IUserService;
@Component
public class UserController {
	
	@Resource
	private IUserService userService;
	
	
	public int insert(User u) {
         int result=userService.insert(u);
		return result;
	}

	public int update(User u) {
		 int result=userService.update(u);
			return result;
	}

	public int delete(User u) {
		 int result=userService.delete(u);
		return result;
	}

	public User get(int id) {

		return userService.get(id);
	}

	public List<User> find(User u) {

		return userService.find(u);
	}
}
